<include file="Index/header" />

<div class="container">
	<nav class="navbar navbar-default" role="navigation">
		<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
			<ul class="nav navbar-nav">
				<li>
					<a href="?m=admin&c=category&a=showList" class="glyphicon glyphicon-arrow-right">返 回</a>
				</li>
			</ul>
			<form class="navbar-form navbar-right" action="?m=admin&c=goods&a=query" method="post" role="search">
				<div class="form-group">
					<input type="text" class="form-control" placeholder="商品名称" name="goods_name" id="name" />
				</div> <button type="submit" class="btn btn-default">搜索</button>
			</form>
		</div>
	</nav>

	<form action="?m=admin&c=category&a=add" method="post" onsubmit="return centianAdd()"
		style="margin: 0 auto; width: 30%;">
		<h3>商品分类添加</h3>
		<div class="form-group">
			<label for="goods_brand">商品分类</label>
			<input type="text" class="form-control" name="cn" id="cn" />
		</div>
		<button type="submit" class="btn btn-default btn-block">新 增</button>
		<button type="reset" class="btn btn-default btn-block">清 除</button>
	</form>
</div>
<br />
<br />
<br />

<script type="text/javascript">
	function centianAdd() {
		var cn = document.getElementById('cn').value;
		if (cn == '') {
			alert("分类名称不能为空！");
			return false;
		}
		if (window.confirm("你确定要新增该分类吗")) {
			return true;
		}
		return false;
	}
</script>
<include file="Index/footer" />